feat: Add ESP32 WiFi Unified OTA update support#898
feat: Add ESP32 WiFi Unified OTA update support#898skgsergio wants to merge 4 commits intomeshtastic:masterfrom
Conversation
|
|
8b314bf to
9b2b0bd
Compare
9b2b0bd to
1eb13c9
Compare
There was a problem hiding this comment.
Pull request overview
Implements ESP32 WiFi Unified OTA support in the Python CLI and library so ESP32 nodes can be updated over WiFi/TCP without the Android app.
Changes:
- Added
ESP32WiFiOTAhelper inmeshtastic/ota.pyto compute firmware hashes and drive the Unified OTA TCP protocol. - Extended
Nodewith astartOTA()admin helper to request OTA mode using the newOTAEventfields. - Wired a new
--ota-updateCLI option inmeshtastic.__main__that triggers WiFi OTA for ESP32 nodes (firmware ≥ 2.7.18) over a TCP connection.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| meshtastic/ota.py | Introduces the ESP32WiFiOTA class that connects to the node’s OTA TCP server, sends size/hash metadata, and streams firmware with basic progress reporting and status handling. |
| meshtastic/node.py | Adds startOTA() on Node to populate AdminMessage.OTAEvent (reboot_ota_mode, ota_hash) and updates the rebootOTA docstring to clarify firmware version applicability. |
| meshtastic/main.py | Imports meshtastic.ota/admin_pb2, adds the --ota-update admin CLI flag, and invokes startOTA() plus the ESP32WiFiOTA flow when running over a TCP interface. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
I'll resolve copilot comments as soon as I'm back to my laptop as well as CI issues. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
That should be it. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #898 +/- ##
==========================================
- Coverage 59.82% 58.73% -1.10%
==========================================
Files 24 25 +1
Lines 4329 4440 +111
==========================================
+ Hits 2590 2608 +18
- Misses 1739 1832 +93
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
0d3cc6f to
4de19f5
Compare
Added ESP32 WiFi Unified OTA update support.
Did not include BLE support as I didn't manage to connect to a device via BLE. I have a draft (AI-generated, because I know little about BLE and its libraries) for BLE, but I'm not going to commit something I can't review and test properly.
Related to #895